var express = require("express");
var app = express();
var router = require("./controller");

app.set("view engine", "ejs"); //express 默认使用的是views文件夹作为模板文件夹

app.use(express.static("./public"));
app.get("/", router.showIndex);
app.get("/:albumName", router.showAlbum);
app.use(function (req, res) {
    res.render("err");
});

app.listen(3000);